/**
 * Copyright &copy; 2017-2020 <a href="http://www.fosung.com/">FosungFrame</a> All rights reserved.
 */
package com.fosung.frame.modules.partycard.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fosung.frame.common.persistence.Page;
import com.fosung.frame.common.service.CrudService;
import com.fosung.frame.modules.partycard.dao.PartycardDao;
import com.fosung.frame.modules.partycard.entity.Partycard;

/**
 * partyCardService
 * 
 * @author zhangfn
 * @version 2017-09-18
 */
@Service
@Transactional(readOnly = true)
public class PartycardService extends CrudService<PartycardDao, Partycard> {
	@Autowired
	private PartycardDao partycardDao;

	public Partycard get(String id) {
		return super.get(id);
	}

	public List<Partycard> findList(Partycard partycard) {
		return super.findList(partycard);
	}

	public List<Partycard> findPersonById(Partycard partycard) {
		return partycardDao.findPersonById(partycard);
	}

	public Page<Partycard> findPage(Page<Partycard> page, Partycard partycard) {
		return super.findPage(page, partycard);
	}

	@Transactional(readOnly = false)
	public void save(Partycard partycard) {
		super.save(partycard);
	}

	public Integer getCardCount(Partycard partycard) {
		return partycardDao.getCardCount(partycard);
	}

	public Integer getPersonCount(Partycard partycard) {
		return partycardDao.getPersonCount(partycard);
	}

	@Transactional(readOnly = false)
	public void delete(Partycard partycard) {
		super.delete(partycard);
	}

}